import LayerModel from "./LayerModel"

export default class GameConfigModel{
    layer:LayerModel[]=[]
    static create(data:string|any):GameConfigModel{
        let json:any
        if(typeof data === 'string'){
            json=JSON.parse(data)
        }else{
            json=data
        }
        const model=new GameConfigModel()
        model.layer=json.layer.map(item=>LayerModel.create(item))
        return model
    }
}